{
    interface Example {
        a: string;
        b: string | number;
        c: () => void;
        d: {};
    }

    type ConditionalPick<T, K> = {
        [key in keyof T as T[key] extends K ? key : never ]: T[key]
    }

    type test = ConditionalPick<Example, string | (() => void)>

    const arr = [1,2,3]
    
}